// app.js
//app.js
App({
  //onLaunch,onShow: options(path,query,scene,shareTicket,referrerInfo(appId,extraData))
  onLaunch: function (options) {
    let menuButtonObject = wx.getMenuButtonBoundingClientRect()
    wx.getSystemInfo({
      success: (res) => {
        let statusBarHeight = res.statusBarHeight //系统状态栏高度
        let navTop = menuButtonObject.top //胶囊按钮和顶部的距离
        let navHeight = menuButtonObject.height + statusBarHeight + (menuButtonObject.top - statusBarHeight) * 2
        this.globalData.navHeight = navHeight
        this.globalData.navTop = navTop
        this.globalData.windowHeight = res.windowHeight
        this.globalData.statusBarHeight=statusBarHeight
      },
    })
  },
  onShow: function (options) {},
  onHide: function () {},
  onError: function (msg) {},
  //options(path,query,isEntryPage)
  onPageNotFound: function (options) {},
  globalData: {},
})